import request from '@/utils/request'

// 查询车型业务配置列表
export function listBusiness(query) {
  return request({
    url: '/car/business/list',
    method: 'get',
    params: query
  })
}

// 查询车型业务配置详细
export function getBusiness(configurationId) {
  return request({
    url: '/car/business/' + configurationId,
    method: 'get'
  })
}
export function tenantBusiness() {
  return request({
    url: '/car/business/tenantBusiness',
    method: 'get'
  })
}

// 新增车型业务配置
export function addBusiness(data) {
  return request({
    url: '/car/business',
    method: 'post',
    data: data
  })
}

// 修改车型业务配置
export function updateBusiness(data) {
  return request({
    url: '/car/business',
    method: 'put',
    data: data
  })
}

// 删除车型业务配置
export function delBusiness(configurationId) {
  return request({
    url: '/car/business/' + configurationId,
    method: 'delete'
  })
}

// 导出车型业务配置
export function exportBusiness(query) {
  return request({
    url: '/car/business/export',
    method: 'get',
    params: query
  })
}
// 查询车系基础配置数据
export function getCarModelConfigList() {
  return request({
    url: '/car/config/getCarModelConfigList',
    method: 'get'
  })
}
// 启停用车型配置
export function availableBrand(data) {
  return request({
    url: '/car/business/editStatus',
    method: 'put',
    data: data
  })
}
